package com.songcha.library_database_sakura.greendao;

import java.util.Map;

import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.AbstractDaoSession;
import org.greenrobot.greendao.database.Database;
import org.greenrobot.greendao.identityscope.IdentityScopeType;
import org.greenrobot.greendao.internal.DaoConfig;

import com.songcha.library_database_sakura.greendao.HomeBannerCacheBean;
import com.songcha.library_database_sakura.greendao.HomeCacheBean;
import com.songcha.library_database_sakura.greendao.HomeScheduleCacheBean;
import com.songcha.library_database_sakura.greendao.SearchHistoryBean;
import com.songcha.library_database_sakura.greendao.VideoPlayProgressBean;
import com.songcha.library_database_sakura.greendao.WordStarBean;

import com.songcha.library_database_sakura.greendao.HomeBannerCacheBeanDao;
import com.songcha.library_database_sakura.greendao.HomeCacheBeanDao;
import com.songcha.library_database_sakura.greendao.HomeScheduleCacheBeanDao;
import com.songcha.library_database_sakura.greendao.SearchHistoryBeanDao;
import com.songcha.library_database_sakura.greendao.VideoPlayProgressBeanDao;
import com.songcha.library_database_sakura.greendao.WordStarBeanDao;

// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.

/**
 * {@inheritDoc}
 * 
 * @see org.greenrobot.greendao.AbstractDaoSession
 */
public class DaoSession extends AbstractDaoSession {

    private final DaoConfig homeBannerCacheBeanDaoConfig;
    private final DaoConfig homeCacheBeanDaoConfig;
    private final DaoConfig homeScheduleCacheBeanDaoConfig;
    private final DaoConfig searchHistoryBeanDaoConfig;
    private final DaoConfig videoPlayProgressBeanDaoConfig;
    private final DaoConfig wordStarBeanDaoConfig;

    private final HomeBannerCacheBeanDao homeBannerCacheBeanDao;
    private final HomeCacheBeanDao homeCacheBeanDao;
    private final HomeScheduleCacheBeanDao homeScheduleCacheBeanDao;
    private final SearchHistoryBeanDao searchHistoryBeanDao;
    private final VideoPlayProgressBeanDao videoPlayProgressBeanDao;
    private final WordStarBeanDao wordStarBeanDao;

    public DaoSession(Database db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
            daoConfigMap) {
        super(db);

        homeBannerCacheBeanDaoConfig = daoConfigMap.get(HomeBannerCacheBeanDao.class).clone();
        homeBannerCacheBeanDaoConfig.initIdentityScope(type);

        homeCacheBeanDaoConfig = daoConfigMap.get(HomeCacheBeanDao.class).clone();
        homeCacheBeanDaoConfig.initIdentityScope(type);

        homeScheduleCacheBeanDaoConfig = daoConfigMap.get(HomeScheduleCacheBeanDao.class).clone();
        homeScheduleCacheBeanDaoConfig.initIdentityScope(type);

        searchHistoryBeanDaoConfig = daoConfigMap.get(SearchHistoryBeanDao.class).clone();
        searchHistoryBeanDaoConfig.initIdentityScope(type);

        videoPlayProgressBeanDaoConfig = daoConfigMap.get(VideoPlayProgressBeanDao.class).clone();
        videoPlayProgressBeanDaoConfig.initIdentityScope(type);

        wordStarBeanDaoConfig = daoConfigMap.get(WordStarBeanDao.class).clone();
        wordStarBeanDaoConfig.initIdentityScope(type);

        homeBannerCacheBeanDao = new HomeBannerCacheBeanDao(homeBannerCacheBeanDaoConfig, this);
        homeCacheBeanDao = new HomeCacheBeanDao(homeCacheBeanDaoConfig, this);
        homeScheduleCacheBeanDao = new HomeScheduleCacheBeanDao(homeScheduleCacheBeanDaoConfig, this);
        searchHistoryBeanDao = new SearchHistoryBeanDao(searchHistoryBeanDaoConfig, this);
        videoPlayProgressBeanDao = new VideoPlayProgressBeanDao(videoPlayProgressBeanDaoConfig, this);
        wordStarBeanDao = new WordStarBeanDao(wordStarBeanDaoConfig, this);

        registerDao(HomeBannerCacheBean.class, homeBannerCacheBeanDao);
        registerDao(HomeCacheBean.class, homeCacheBeanDao);
        registerDao(HomeScheduleCacheBean.class, homeScheduleCacheBeanDao);
        registerDao(SearchHistoryBean.class, searchHistoryBeanDao);
        registerDao(VideoPlayProgressBean.class, videoPlayProgressBeanDao);
        registerDao(WordStarBean.class, wordStarBeanDao);
    }
    
    public void clear() {
        homeBannerCacheBeanDaoConfig.clearIdentityScope();
        homeCacheBeanDaoConfig.clearIdentityScope();
        homeScheduleCacheBeanDaoConfig.clearIdentityScope();
        searchHistoryBeanDaoConfig.clearIdentityScope();
        videoPlayProgressBeanDaoConfig.clearIdentityScope();
        wordStarBeanDaoConfig.clearIdentityScope();
    }

    public HomeBannerCacheBeanDao getHomeBannerCacheBeanDao() {
        return homeBannerCacheBeanDao;
    }

    public HomeCacheBeanDao getHomeCacheBeanDao() {
        return homeCacheBeanDao;
    }

    public HomeScheduleCacheBeanDao getHomeScheduleCacheBeanDao() {
        return homeScheduleCacheBeanDao;
    }

    public SearchHistoryBeanDao getSearchHistoryBeanDao() {
        return searchHistoryBeanDao;
    }

    public VideoPlayProgressBeanDao getVideoPlayProgressBeanDao() {
        return videoPlayProgressBeanDao;
    }

    public WordStarBeanDao getWordStarBeanDao() {
        return wordStarBeanDao;
    }

}
